<table class="cms_browsetext" cellspacing="0" cellpadding="0" width="100%" border="0">
	<tr>
	  <th align="left" ><a href="#">Title</a></th>
	  <th align="left" width="15">&nbsp;</th>
	  <th width="75" align="left">Action</th>
	</tr>

<?

	//extract the folderid..
	$folder = extractNumberWithKeyFromArray('folder', $_REQUEST, null);
	if (!is_null($folder)) {
		$cmsDocument->addConstraint('categorycode',$folder,'=');
	}
	
	$upUrl = $_SERVER['PHP_SELF'] . '?formNo=1&formid=133&folder='.$folder;
	
	$returnURL = $_SERVER['PHP_SELF'] . "?fileNo=1&formid=132&sorts=clear&direction=clear&pageNumber=$pageNumber&folder=$folder";
	$cancelURL = $returnURL;	
	
	$cmsDocument->resetIterator();
	while ($bookmark = $cmsDocument->nextDocument()) {
		
		$bookmarkTitle  = magicClean($bookmark->title);
		$bookmarkDesc  = magicClean($bookmark->shortdescription);		
		$editUrl = $_SERVER['PHP_SELF'] . '?fileNo=2&documentCode=' . $bookmark->documentcode;
		$deleteUrl = $_SERVER['PHP_SELF'] . '?fileNo=4&documentCode=' . $bookmark->documentcode . '&returnURLEncoded=' . urlencode($returnURL). '&cancelURLEncoded=' . urlencode($cancelURL);

		print <<< EOD
    <tr> 
      <td align="left" colspan="3"><img height="7" src="/cms/images/greyline.gif" width="100%" /></td>
    </tr>
    <tr> 
      <td class="cms_browsetext" ><b>$bookmarkTitle</b><br>
        $bookmarkDesc
      	<br />
        <a class="cms_bookmark" href="$bookmark->author" target="_blank">$bookmark->author</a>
       </td>
      <td width="15" style="vertical-align: bottom;">&nbsp;</td>
      <td class="cms_browsetext" width="75" style="vertical-align: bottom;">
EOD;
		if(editFormAuth($authInfo, $formDescription, $bookmark->documentcode, $db)) {
			print <<< EOD
<a href="$editUrl">Edit</a> 
EOD;
		}
		if(deleteFormAuth($authInfo, $formDescription, $bookmark->documentcode, $db)) {
			print <<< EOD
      / <a href="$deleteUrl">Delete</a>
EOD;
		}
print <<< EOD
      </td>
    </tr>
EOD;

	}
?>    
</table>
<table cellpadding="0" cellspacing="0" width="100%" border="0">
	<TR> 
	  <TD align="left" colSpan="2"><IMG height="7" src="/cms/images/greyline.gif" width="100%" /></TD>
	</TR>
	<TR> 
	  <TD class="cms_browsetext" width="35"><a href="<?= $upUrl ?>"><img src="/cms/html/files/images/icon_folderup.gif" width="35" height="20" /></a></TD>
	  <TD class="cms_browsetext" ><a href="<?= $upUrl ?>"><i>.. Back to bookmark folder.</i></a></TD>
	</tr>
	<TR> 
	  <TD align="left" colSpan="2"><IMG height="7" src="/cms/images/greyline.gif" width="100%" /></TD>
	</TR>            
</table>
